vtpmmgr: Remove bogus cast from TPM2_GetRandom
authorJason Andryuk <jandryuk@gmail.com>
Thu, 6 May 2021 13:59:20 +0000 (09:59 -0400)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 10 May 2021 13:50:33 +0000 (14:50 +0100)
commit7f4276fad8f0bfba5bb3fd012bf2df51c05fcf02
tree964577ce6acf6563322d51974e1fb6003015cc26
parent64d00dd126b3dfa4370805f1dc3d7c1ddb6a130d
vtpmmgr: Remove bogus cast from TPM2_GetRandom

The UINT32 <-> UINT16 casting in TPM2_GetRandom is incorrect.  Use a
local UINT16 as needed for the TPM hardware command and assign the
result.

Suggested-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Daniel P. Smith <dpsmith@apertussolutions.com>
stubdom/vtpmmgr/tpm2.c